package cn.wolfcode.luowowo.article.service.impl;

import cn.wolfcode.luowowo.article.domain.ScenicMafengwo;
import cn.wolfcode.luowowo.article.mapper.ScenicMafengwoMapper;
import cn.wolfcode.luowowo.article.query.ScenicAllQuery;
import cn.wolfcode.luowowo.article.service.IScenicMafengwoService;
import com.alibaba.dubbo.config.annotation.Service;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service
public class ScenicMafengwoServiceImpl implements IScenicMafengwoService{

    @Autowired
    private ScenicMafengwoMapper ScenicMafengwoMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return 0;
    }

    @Override
    public int insert(ScenicMafengwo record) {
        return 0;
    }

    @Override
    public ScenicMafengwo selectByPrimaryKey(Long id) {
        return null;
    }

    @Override
    public List<ScenicMafengwo> selectAll() {
        return ScenicMafengwoMapper.selectAll();
    }

    @Override
    public int updateByPrimaryKey(ScenicMafengwo record) {
        return 0;
    }

    @Override
    public PageInfo selectForList(ScenicAllQuery qo) {

        PageHelper.startPage(qo.getCurrentPage(),qo.getPageSize());

        List<ScenicMafengwo> list = ScenicMafengwoMapper.selectForList(qo);

        return new PageInfo(list);
    }
}
